package App.Repository.impl;

import App.Model.Project.CrmProjectTask;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import java.util.Set;

public interface ProjectTaskDao extends JpaRepository<CrmProjectTask,Long> {
    @Query(value = "select pt.recid,pt.projectid,pt.stageid,pt.taskid,  t.recname as taskname, t.content,t.begintime,t.taskstatus,t.reccreator from crm_project_task pt inner join crm_task t on pt.taskid=t.recid  where pt.recstatus=1 and pt.projectid in ?1",nativeQuery = true)
    List<CrmProjectTask> getProjectTask(Set<String> projectIds);
}
